package com.chilly.designpattern.proxy;

/**
 * Created by Chilly Cui on 2020/11/18.
 */
public class ProxyAirTicket implements IAirTicket {
    private AirTicket airTicket;
    public ProxyAirTicket() {
        airTicket = new AirTicket();
    }

    @Override
    public void buy() {
        System.out.println("代理");
        airTicket.buy();
    }

    public static void main(String[] args) {
        IAirTicket airTicket = new ProxyAirTicket();
        airTicket.buy();
    }
}
